:root {
  --bg: #0b0d17;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #8a92a8;
  --field: rgba(255, 255, 255, 0.04);
  --field-border: rgba(255, 255, 255, 0.12);
  --accent: #6366f1;
  --accent-2: #a855f7;
  --danger: #f43f5e;
  --success: #10b981;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: var(--accent);
  top: -180px;
  left: -140px;
}

body::after {
  background: var(--accent-2);
  bottom: -200px;
  right: -160px;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 34px 30px 30px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}

.badge svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: #c3cad9;
  margin-bottom: 7px;
}

.field {
  margin-bottom: 16px;
}

input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder {
  color: #5c6478;
}

input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

button {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.15s, transform 0.08s;
}

button:hover:not(:disabled) {
  filter: brightness(1.1);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Inline error alert */
.alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 13px;
  font-size: 13.5px;
  border-radius: var(--radius);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #ffc2cd;
}

.alert.show {
  display: flex;
  animation: shake 0.35s;
}

.alert svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  stroke: var(--danger);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Success page */
.badge.ok {
  background: linear-gradient(135deg, #10b981, #22d3ee);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
}

.link {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link:hover {
  color: var(--text);
  border-bottom-color: var(--muted);
}

/* Footer geo strip on the login page */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.foot strong {
  color: #c3cad9;
  font-weight: 600;
}
