*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0f17;
  color: #e5e7eb;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gate-card {
  width: 100%;
  max-width: 340px;
  background: #121826;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.field {
  margin-bottom: 14px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #283548;
  background: #0b0f17;
  color: #f3f4f6;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.16s ease;
}

.field input::placeholder {
  color: #6b7280;
}

.field input:focus {
  border-color: #4b5563;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: #e5e7eb;
  color: #0b0f17;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.16s ease;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.subtle-row {
  margin-top: 16px;
  text-align: center;
}

.subtle-row.split {
  display: flex;
  justify-content: space-between;
}

.link-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 4px;
}

.link-btn:hover {
  color: #d1d5db;
}

.msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.msg.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.msg.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.otp-hint {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.45;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.otp-digit {
  width: 100%;
  height: 46px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #283548;
  background: #0b0f17;
  color: #f9fafb;
  outline: none;
}

.otp-digit:focus {
  border-color: #9ca3af;
}
