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

body {
  background-color: #020a12;
  color: #ecf5ff;
  font-family: "Inter", sans-serif;
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* same deep icy background as index */
.bg-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(ellipse at 30% 40%, #0a1e30, #01050b);
}

.ice-dust {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(170, 220, 255, 0.07) 1px,
    transparent 1px
  );
  background-size: 45px 45px;
  opacity: 0.6;
}

canvas#ptx {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* top bar — same as index */
.top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 1.4rem 2.5rem;
  border-bottom: 1px solid rgba(140, 200, 240, 0.2);
}

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(130deg, #fff, #b2dcff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-decoration: none;
}

.logo-sub {
  font-size: 0.7rem;
  letter-spacing: 0.2rem;
  color: #79b3d4;
  margin-left: 0.3rem;
}

.nav-tag {
  font-size: 0.8rem;
  font-weight: 400;
  color: #9bc2e0;
  letter-spacing: 0.3px;
}

/* center the card vertically */
.page-center {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

/* login card */
.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(6, 22, 38, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  padding: 2.8rem 2.4rem;
  border: 1px solid rgba(80, 160, 215, 0.25);
  box-shadow: 0 20px 60px rgba(0, 10, 25, 0.7);
  animation: cardFadeIn 0.5s ease forwards;
  position: relative;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: #84bedf;
  text-align: center;
  margin-bottom: 0.8rem;
}

.card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.3rem;
  background: linear-gradient(120deg, #ffffff, #aad4ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.divider-ice {
  width: 50px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #8fcbff,
    #d0edff,
    #8fcbff,
    transparent
  );
  margin: 1rem auto 1.8rem;
}

/* alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
  text-align: center;
}
.alert-error {
  background: rgba(180, 40, 60, 0.2);
  border: 1px solid rgba(220, 80, 100, 0.4);
  color: #ffb3be;
}
.alert-success {
  background: rgba(30, 120, 90, 0.2);
  border: 1px solid rgba(60, 180, 130, 0.4);
  color: #a0f0d0;
}
.admin-notice {
  background: rgba(90, 150, 200, 0.12);
  border: 0.5px solid rgba(120, 190, 240, 0.4);
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  color: #bfe0ff;
  text-align: center;
}

/* form */
.form-group {
  margin-bottom: 1.3rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  color: #9bc2e0;
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #5a9ec0;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #5a9ec0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.input-icon-right:hover {
  color: #b6e2ff;
}

.status-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.status-icon.show {
  display: flex;
}
.status-icon.loading {
  color: #7fb8d8;
}
.status-icon.loading.spin svg {
  animation: iconSpin 0.8s linear infinite;
}
.status-icon.verified {
  color: #34d399;
}
.status-icon.error {
  color: #ff8a94;
}

@keyframes iconSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.85rem 2.7rem 0.85rem 2.6rem;
  background: rgba(8, 28, 48, 0.7);
  border: 1px solid rgba(80, 150, 210, 0.35);
  border-radius: 0.9rem;
  color: #ecf5ff;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: all 0.25s ease;
}

input:focus {
  border-color: rgba(140, 200, 255, 0.7);
  background: rgba(10, 38, 65, 0.8);
  box-shadow: 0 0 0 3px rgba(100, 180, 240, 0.1);
}

input::placeholder {
  color: #4a7a9b;
}

/* submit button */
.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: rgba(90, 150, 200, 0.15);
  border: 1px solid rgba(120, 190, 250, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 3rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #edf6ff;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  margin-top: 0.4rem;
}

.btn-primary:hover {
  background: rgba(40, 100, 160, 0.5);
  border-color: #b6e2ff;
  box-shadow: 0 0 18px rgba(80, 170, 240, 0.25);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #edf6ff;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.5rem;
  animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* links */
.switch-link {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: #6a9fc0;
}

.switch-link a {
  color: #8fcbff;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.switch-link a:hover {
  color: #cce8ff;
}

.ice-spark {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 5px;
  color: #2d6080;
  margin-top: 1.8rem;
}

/* footer */
.footnote {
  font-size: 0.68rem;
  text-align: center;
  color: #3d6a88;
  border-top: 1px solid rgba(80, 140, 190, 0.15);
  padding: 1.5rem 2.5rem;
}

/* debug */
.debug-panel {
  max-width: 800px;
  margin: 20px auto;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 15px;
  font-family: monospace;
  font-size: 12px;
  color: #10b981;
  overflow: auto;
  max-height: 300px;
  display: none;
}
.debug-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 20px;
  z-index: 1000;
}

@media (max-width: 640px) {
  .top-bar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.4rem 1.2rem;
    gap: 0.3rem;
  }
  .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.7rem;
    line-height: 1.35;
  }
  .logo-sub {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
    font-size: 0.62rem;
    letter-spacing: 0.15rem;
  }
  .nav-tag {
    font-size: 0.68rem;
    opacity: 0.85;
  }
}

@media (max-width: 500px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
  }
  .card-title {
    font-size: 2rem;
  }
}
