* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Avenir Next", "Futura", "Trebuchet MS", sans-serif;
  color: #23262d;
  background:
    radial-gradient(circle at 12% 10%, rgba(155, 167, 201, 0.18), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(158, 185, 190, 0.14), transparent 34%),
    linear-gradient(145deg, #d9dde5, #cfd5de 58%, #c5ccd8);
  display: grid;
  place-items: center;
  padding: 20px;
}

html {
  min-height: 100%;
  background: #cfd5de;
}

.auth-card {
  width: min(420px, 95vw);
  border-radius: 18px;
  border: 1px solid rgba(117, 125, 142, 0.3);
  background: rgba(248, 250, 254, 0.9);
  box-shadow: 0 16px 40px rgba(28, 35, 49, 0.2);
  padding: 18px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.subtitle {
  margin: 2px 0 14px;
  font-size: 13px;
  color: #64718a;
}

.form { display: none; }
.form.active { display: block; }

.invite-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(120, 134, 164, 0.28);
  background: rgba(232, 238, 248, 0.8);
}

.invite-meta-title {
  font-size: 13px;
  font-weight: 800;
  color: #2f3e59;
}

.invite-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #5b6b89;
}

.invite-meta-row strong {
  color: #253149;
  text-align: right;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

label {
  font-size: 12px;
  color: #5b6b89;
}

input {
  width: 100%;
  border: 1px solid rgba(120, 134, 164, 0.36);
  border-radius: 11px;
  background: rgba(235, 240, 248, 0.92);
  color: #253149;
  font-size: 14px;
  padding: 10px 11px;
  outline: none;
}

input:focus {
  border-color: rgba(65, 84, 123, 0.62);
}

.submit {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 10px;
  background: linear-gradient(130deg, #2f3e59, #4d5f7f);
  color: #f2f6ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.message {
  margin-top: 10px;
  min-height: 16px;
  font-size: 12px;
  color: #2b7a53;
}

.message.error {
  color: #bb3f57;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 24, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  z-index: 90;
}

.boot-overlay.active {
  display: flex;
}

.boot-loader {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid rgba(198, 211, 242, 0.24);
  border-top-color: rgba(232, 240, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(145, 166, 214, 0.25), 0 10px 26px rgba(8, 12, 20, 0.42);
  animation: spin 0.9s linear infinite;
}

.boot-text {
  color: #d7e2fd;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: fade-pulse 1.2s ease-in-out infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fade-pulse {
  0%, 100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}


@media (max-width: 640px) {
  body {
    padding: 0;
    display: block;
    min-height: 100dvh;
  }

  .auth-card {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  h1 {
    font-size: 28px;
  }
}
