:root {
  --bg: #0b1220;
  --bg-panel: rgba(20, 28, 44, 0.62);
  --bg-soft: rgba(53, 67, 91, 0.84);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(103, 245, 156, 0.35);
  --text: #f4f7fb;
  --text-dim: #c1ccdd;
  --accent: #67f59c;
  --accent-strong: #21d573;
  --danger-soft: rgba(255, 76, 76, 0.18);
  --danger-line: rgba(255, 76, 76, 0.38);
  --shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

body {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background-image:
    linear-gradient(
      180deg,
      rgba(11, 18, 32, 0.55) 0%,
      rgba(11, 18, 32, 0.35) 45%,
      rgba(11, 18, 32, 0.7) 100%
    ),
    var(--login-bg-image, none);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center center, center center;
  background-attachment: fixed, fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 22%, rgba(103, 245, 156, 0.18), transparent 38%),
    radial-gradient(circle at 82% 80%, rgba(88, 101, 242, 0.22), transparent 42%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(520px, 100%);
  display: grid;
  gap: 22px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-panel);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 35%
  );
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border: 1px solid var(--line);
}

.login-header {
  display: grid;
  gap: 12px;
}

.login-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-header h1,
.login-panel-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

.login-header h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.login-panel-copy h2 {
  font-size: 1.2rem;
}

.login-copy,
.login-panel-copy p,
.login-notes {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.65;
}

.login-panel-copy {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 28px;
  border-radius: 14px;
  background: #5865f2;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(88, 101, 242, 0.38);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.login-button:hover,
.login-button:focus-visible {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(88, 101, 242, 0.5);
}

.login-button-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.login-error {
  padding: 14px 16px;
  border: 1px solid var(--danger-line);
  border-radius: 14px;
  background: var(--danger-soft);
  color: #ffd1d1;
}

.login-notes {
  padding-left: 18px;
  font-size: 0.9rem;
}

.login-notes li + li {
  margin-top: 8px;
}

@media (max-width: 600px) {
  .login-shell {
    padding: 18px;
  }

  .login-card {
    padding: 26px;
    border-radius: 20px;
  }

  body {
    background-attachment: scroll, scroll;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card {
    background: rgba(15, 22, 38, 0.92);
  }
}

.legal-footer {
  margin: 40px auto 0;
  padding: 18px 24px 0;
  max-width: 720px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

.legal-footer p {
  margin: 0;
}
