* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  background: #0b0f0d;
  color: #f5f0e5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0b0f0d;
  color: #f5f0e5;
}

.auth-card {
  width: min(100%, 420px);
  min-height: 340px;
  padding: 42px 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #141a17;
  color: #f5f0e5;
  border: 1px solid rgba(245, 240, 229, 0.09);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.brand-icon {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
  margin: 0 0 16px;
}

.wordmark {
  margin: 0 0 34px;
  color: #f5f0e5;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

.cf-turnstile {
  width: 100%;
  min-height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
}

button {
  width: min(100%, 300px);
  margin-top: 20px;
  padding: 13px 20px;
  border: 1px solid rgba(245, 240, 229, 0.12);
  border-radius: 10px;
  background: #f5f0e5;
  color: #19352b;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

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

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

.status {
  width: 100%;
  min-height: 20px;
  margin: 16px 0 0;
  color: rgba(245, 240, 229, 0.65);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.status.error {
  color: #e7a0a0;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 34px 24px 30px;
    border-radius: 14px;
  }

  .brand-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
  }

  .wordmark {
    margin-bottom: 28px;
  }
}

.connection {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.connection h1 {
  margin: 0;
  color: #f5f0e5;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}

.spinner {
  width: 24px;
  height: 24px;
  margin: 0 0 22px;
  border: 2px solid rgba(245, 240, 229, 0.16);
  border-top-color: #f5f0e5;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.error-panel {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(231, 160, 160, 0.18);
  border-radius: 10px;
  background: rgba(231, 160, 160, 0.05);
}

.error-code {
  color: #e7a0a0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.error-message {
  margin-top: 5px;
  color: rgba(245, 240, 229, 0.65);
  font-size: 12px;
  line-height: 1.4;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-list {
  width: 100%;
  margin: 22px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 240, 229, 0.38);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.progress-icon {
  width: 20px;
  flex: 0 0 20px;
  text-align: center;
  font-weight: 700;
}

.progress-step.complete {
  color: #f5f0e5;
}

.progress-step.active {
  color: rgba(245, 240, 229, 0.82);
}

.progress-step.failed {
  color: #e7a0a0;
}
