:root {
  --bg: #f2f5fb;
  --line: #dbe4f1;
  --text: #0f172a;
  --muted: #55627b;
  --accent: #1e3a8a;
  --ok: #166534;
  --error: #991b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, 0.12), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(16, 185, 129, 0.1), transparent 32%),
    var(--bg);
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(64px);
  opacity: .36;
  pointer-events: none;
}

.bg-shape--a {
  width: 340px;
  height: 340px;
  right: -90px;
  top: -100px;
  background: #93c5fd;
}

.bg-shape--b {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: -80px;
  background: #99f6e4;
}

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

.login-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.98));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.11);
}

.eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--muted);
}

.login-card h1 {
  margin: 9px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  letter-spacing: -0.02em;
}

.login-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
}

input, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  font: inherit;
}

input {
  min-height: 48px;
  background: #fcfdff;
  color: var(--text);
}

input::placeholder {
  color: #7b879d;
}

input:focus {
  border-color: #9fb4de;
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12);
  outline: none;
}

.input-with-action {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 8px;
}

.icon-action {
  cursor: pointer;
  background: #fff;
  color: #334155;
  padding: 0;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 66px;
  border: 1px solid #d8e1ee;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.turnstile-widget {
  width: 100%;
  min-height: 46px;
}

.turnstile-wrap.is-invisible-mode {
  min-height: 10px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.turnstile-widget.is-invisible-mode {
  min-height: 0;
}

button.primary {
  min-height: 54px;
  border-radius: 14px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 1.04rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(30, 58, 138, 0.24);
}

button.primary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

button.primary.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-spin .75s linear infinite;
}

@keyframes button-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.message {
  margin-top: 10px;
  min-height: 22px;
  font-size: .84rem;
  font-weight: 600;
  padding: 2px 2px 0;
}

.message.error { color: var(--error); }
.message.ok { color: var(--ok); }

.login-card.is-auth-loading .turnstile-wrap {
  opacity: .65;
  pointer-events: none;
}

@media (max-width: 640px) {
  .login-card {
    padding: 22px;
    border-radius: 18px;
  }
}
